/* USER CODE BEGIN Header */
/**
 ******************************************************************************
 * @file           : air780e.h
 * @brief          : Header for air780e.c file.
 *                   This file contains the common defines of the application.
 ******************************************************************************
 * @attention
 *
 * Copyright (c) 2023 STMicroelectronics.
 * All rights reserved.
 *
 * This software is licensed under terms that can be found in the LICENSE file
 * in the root directory of this software component.
 * If no LICENSE file comes with this software, it is provided AS-IS.
 *
 ******************************************************************************
 */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __AIR780E_H
#define __AIR780E_H

#ifdef __cplusplus
extern "C"
{
#endif

/* Includes ------------------------------------------------------------------*/

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "dht11.h"
#include "ctrl.h"
    /* USER CODE END Includes */

    /* Exported types ------------------------------------------------------------*/
    /* USER CODE BEGIN ET */

/*
  需要注意的是Air780E官网里面的技术文档说
  AT短信只能使用移动运营商，所以在使用Air
  780E的短信服务时一定要插入移动运营商的卡。
*/
#define Mobile_Phone "19126232293" /* 修改为自己需要接收短信的手机号码 -- PS:这个不是Air780E插入的卡 */

    /* USER CODE END ET */

    /* Exported constants --------------------------------------------------------*/
    /* USER CODE BEGIN EC */

    /*
        freertos_air780e_stru
        @param send_flag 发送标志位
    */
    struct freertos_air780e_stru
    {
        uint8_t send_flag; /* 发送标志位 */
    };

    /*
        freertos_air780e_stru
        @param send_flag 发送标志位
    */
    typedef struct freertos_air780e_stru air780e_t;
    /* USER CODE END EC */

    /* Exported macro ------------------------------------------------------------*/
    /* USER CODE BEGIN EM */
    void air780e_init(void);
    void send_dht_sms_app(dht_t *dht_data, air780e_t *air780e);
    void send_warning_sms_app(void);
    void send_abnormal_sms_app(void);
    void send_ctrl_option_sms_app(bool option);
    void usart2_proc(char *str, uint8_t *index, air780e_t *air780e, ctrl_t *device);
    /* USER CODE END EM */

    /* Exported functions prototypes ---------------------------------------------*/

    /* USER CODE BEGIN EFP */

    /* USER CODE END EFP */

    /* Private defines -----------------------------------------------------------*/
    /* USER CODE BEGIN Private defines */

    /* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __LOG_H */
